<!DOCTYPE html>
<html lang="en">
<head th:insert="/admin/common/head::css"></head>
<body>
<div th:insert="/admin/common/header::header" ></div>
<!--  main  -->
<div class="container-fluid">
    <div class="row-fluid">
        <div th:insert="/admin/common/side::side" ></div>
        <!-- content  内容页面的代码放这里 -->
        <div class="block">
            <div class="block-content collapse in">
                <div class="span12">

                        <legend>帖子</legend>

                        <div class="control-group">
                            <div class="controls">
                                    [[ ${luntan.title} ]]
                            </div>
                        </div>
                    <div class="control-group">
                        <div class="controls">
                            [[ ${luntan.user.username} ]]
                        </div>
                    </div>

                    <div class="control-group">
                        <div class="controls">
                            [[ ${luntan.content} ]]
                        </div>
                    </div>

                </div>
            </div>
        </div>

        <form method="post" th:action = "@{/admin/luntan/review/add}">
            <input hidden="hidden" name = "luntanId" th:value="${luntan.id}">
            <textarea style="width: 100%;height: 100%" name="msg" required>
            </textarea>
            <input type="submit" value="发表评论"/>
        </form>

        <div style="display: flex; flex-direction: column; border-top: #0f0f0f 1px solid" th:each = "review : ${reviews}">
            <div style="display: flex;flex-direction: row;">
                <span>[[ ${review.user.username} ]]</span>
                <span>[[ ${#dates.format(review.time, 'yyyy-MM-dd HH:mm:ss')} ]]</span>
            </div>
            <div>[[ ${review.msg} ]]</div>

        <!-- content -->
    </div>
</div>
<!--  main  -->

</body>
<div th:insert="/admin/common/footer::js" ></div>

</html>